<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>会员列表</title>
    <link rel="stylesheet" href="../layui/css/layui.css"/>
    <script type="text/javascript" src="../layui/layui.js"></script>
    <script type="text/javascript" src="../js/jquery.min.js"></script>
    <script type="text/javascript" src="../js/context.js"></script>
</head>
<body>
<div class="container">
    <table class="layui-table">
        <colgroup>
            <col width="150">
            <col width="200">
            <col>
        </colgroup>
        <thead>
        <tr>
            <th>编号</th>
            <th>姓名</th>
            <th>电话</th>
        </tr>
        </thead>
        <tbody id="tbody">

        </tbody>
    </table>
</div>
<script>
    window.onload = function () {
        ajax.post("../findAllUser.do", null, response => {
            $("#tbody").html("");
            response.forEach(function (obj) {
                let tr = `<tr>
                <td>${obj.loginId}</td>
                <td>${obj.loginName}</td>
                <td>${obj.phone}</td>
                </tr>`;
                $("#tbody").append(tr);
            })
        })
    }
</script>
</body>
</html>